<template>
  <div class="app-header"></div>
  <div class="app-content">
    <router-view />
  </div>
  <div class="app-footer">
    <nav-bar></nav-bar>
  </div>
</template>
<script>

import navBar from "@/components/NavBar.vue";
import { NavBar } from "vant";
import { checkLogin } from "@/service/user";
import "./global.less"
export default {
  name: 'App',
  mounted(){
    checkLogin().then(res=>{
      if(res.status == 401){
        this.$router.push('/login')
      }
    })
  },
  components: {
    navBar,
    [NavBar.name]:NavBar,
  }
}
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  /* padding-bottom: 3.125rem; */
}


</style>
